local MakeAccessor = UI.MakeAccessor
local MakeTypeSetter = UI.MakeTypeSetter
local CheckWidgetType = UI.CheckWidgetType
local CheckArgType = UI.CheckArgType
local IsWidgetType = UI.IsWidgetType

--[[ UIObject ]]--
local UIObject = UI.NewWidgetType("UIObject")
UIObject.parameters = {
	alpha = 1
}

function UIObject:Initialize(o, name, type)
	if not UI.params[o] then
		UI.params[o] = {
			name = name,
			type = type,
		}
	end
end

MakeAccessor("UIObject", "GetName", "name")
MakeAccessor("UIObject", "GetObjectType", "type")

function UIObject.prototype:IsObjectType(type)
	CheckWidgetType("UIObject:IsObjectType", self, "UIObject")
	CheckArgType("UIObject:IsObjectType", 2, "type", "string", type)
	return IsWidgetType(self, type)
end

